<body class="gray-bg">
<div class="ibox-content">
    <form class="form-horizontal" method="post" action="{:url('ChannelField/edit')}">
        <input type="hidden" name="id" value="{$info['id']|default='0'}">
        <input type="hidden" name="ext_table" value="{$info['ext_table']|default='0'}">
        <div class="form-group">
            <label class="col-sm-2 control-label">表单提示文字</label>
            <div class="col-sm-8">
                <input name="show_name" class="form-control" type="text" placeholder="请输名称" value="{$info['show_name']|default=''}"/>
                <span class="help-block m-b-none">发布内容时显示的提示文字</span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">字段名称</label>
            <div class="col-sm-8">
                <input name="field_name" class="form-control" type="text" placeholder="请输名称" value="{$info['field_name']|default=''}" readonly/>
                <span class="help-block m-b-none">只能用英文字母或数字，数据表的真实字段名</span></div>
        </div>
        <div class="form-group text-left">
            <label class="col-sm-2 control-label">数据类型</label>
            <div class="col-sm-8">
                <select data-placeholder="选择数据类型..." name="field_type" class="chosen-select type-chosen-select" >
                    {volist name='typelist' id='vo'}
                    <option value="{$key}"{notempty name="info['field_type']"} {if condition="$info.field_type eq $key" } selected  {/if} {/notempty}>{$vo['name']}</option>
                    {/volist}
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">字段默认值</label>
            <div class="col-sm-8">
                <textarea name="default_value" class="form-control">{$info['default_value']|default=''}</textarea>
                <span class="help-block m-b-none">如果定义数据类型为select、radio、checkbox时，此处填写被选择的项目(用“,”分开，如“男,女,人妖”)。</span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">最大值</label>
            <div class="col-sm-8">
                <input name="maxlength" class="form-control" type="text" value="{$info['maxlength']|default='10'}" required/>
                <span class="help-block m-b-none">文本数据必须填写，大于255为text类型</span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">字段备注</label>
            <div class="col-sm-8">
                <input name="desc" class="form-control" type="text" value="{$info['desc']|default='0'}" />
                <span class="help-block m-b-none">前台字段备注,字段提示</span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">排序</label>
            <div class="col-sm-8">
                <input name="sort" class="form-control" type="text" placeholder="排序" value="{$info['sort']|default='100'}"/>
                <span class="help-block m-b-none">用于编辑区域位置排序</span></div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">启用</label>
            <div class="col-sm-8">
                <div class="checkbox i-checks">
                    <input type="checkbox" name="visible" value="1" {eq name="$info['visible']" value='1'} checked{/eq}/>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-8">
                {include file="admin@layout/save_btn"}
            </div>
        </div>
    </form>
</div>